<?php
header("Content-Type: text/html;charset=utf-8");

include('Includes/DB.inc.php');
include('Includes/AC.inc.php');

$dbh = db::connect();
//print_r(ac::getUserPurview('1', $dbh, DBTP));

//print_r(ac::getUserMenuSort('1', $dbh, DBTP));

//print_r(ac::buildMenu());


print_r(ac::buildUserMenu('1', $dbh, DBTP));

//print_r(ac::getApps());



//a:0:{}


//print_r(ac::buildAppList());


/*
$uid = "1";
$dbh = db::connect();
$sql = "SELECT purview FROM p_ac_users WHERE uid=:uid LIMIT 1";
$sth = $dbh->prepare($sql);
$dbh = null;
$sth->bindParam(':uid',$uid);
$sth->execute();
$result = $sth->fetch(PDO::FETCH_ASSOC);
$purview = unserialize($result['purview']);
print_r(ac::filterVoidPurview($purview));
print_r($purview);
*/
